﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;

namespace SqlFileLayoutViewer
{
    static class ColorLib
    {
        public static List<HSLColor> GenColorPal(
        int colorCount,
        double saturation,
        double luminance)
        {
            List<HSLColor> colors = new List<HSLColor>();
            Random r = new Random();

            int angle = 0;

            for (int i = 0; i < colorCount; i++)
            {               
                HSLColor hslColor = new HSLColor(
                   angle, 
                   saturation,
                   luminance);

                colors.Add(hslColor);

                angle = (angle + 13);
                if (angle >= 240)
                {
                    angle -= 240;
                    luminance -= 5;
                }
            }
            return colors;
        }
    }
}
